home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
425_01
/
tar
/
percent.c
< prev
next >
Wrap
Text File
|
1980-07-23
|
340b
|
16 lines
/* This is part of the Tar program */
#include <stdio.h>
void percent(curr, size)
long curr, size;
{
static ratio = -1;
register r1;
r1 = (short)(size>21474836L ? curr/(size/100) : (100*curr)/size);
if (r1 != ratio) {
(void)fprintf(stderr, "%3d%%\b\b\b\b", ratio=r1);
(void)fflush (stderr);
}
}